package com.linshidream.intrachat.simplenio.packet.handler;

import java.nio.ByteBuffer;
import java.util.List;

/**
 * Created on 2025/8/2 20:35
 *
 * @author linshidream
 * @version 1.0.0
 * @description
 */

public interface MessageCodec {
    /**
     * 编码
     * @param msg
     * @return
     */
    ByteBuffer encode(String msg);

    /**
     * 解码
     * @param buffer
     * @return
     */
    List<String> decode(ByteBuffer buffer);
}
